
/* Author: Manfred Gschweidl */

#ifndef GLOBUSCALLBACK_H_
#define GLOBUSCALLBACK_H_

#include <cstdio>
#include <iostream>
#include <globus_common.h>

namespace globus_common { 

//generic callback class for asynchronous communication
class GlobusCallback {
	protected:
 		globus_mutex_t mutex;
		globus_cond_t cond;
		globus_bool_t done;
    public:
		GlobusCallback();
		~GlobusCallback();
		//isFinished
		globus_bool_t isDone();
		//finished
    	virtual void setDone();
    	//continue 
    	virtual void proceed();
    	//wait for condition
		virtual void wait(); 
};

}

#endif /*GLOBUSCALLBACK_H_*/
